package com.javen.service.impl;

import com.javen.dao.IDealDao;
import com.javen.model.Deal;
import com.javen.service.IDealService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service("DealService")
public class DealServiceImpl
        implements IDealService {
    @Resource
    private IDealDao dealDao;

    public int insertDealRecord(Deal deal) {
        return this.dealDao.insertDealRecord(deal);
    }

    public List<Deal> showDealsByUsername(String username) {
        return this.dealDao.showDealsByUserName(username);
    }

    public int updateDeal(Deal deal) {
        return this.dealDao.updateDeal(deal);
    }

    public int delDeal(Integer id) {
        return this.dealDao.deleteDeal(id);
    }
}

